package com.org.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.URL;

/**
 * ClassName: Admin
 * Package: com.org.pojo
 * Description:
 *
 * @Author Origin
 * @Create 2024/2/3 19:05
 * @Version 1.0
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Admin {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id; //主键id
    private String username;    //用户名

    @JsonIgnore //让springmvc把当前对象转换成json字符串的时候，忽略password，最终的json字符串中就灭有password这个属性了
    private String password;    //密码

    @URL
    private String userPic; //头像
}
